import request from "@/libs/request";

const basePath = '/appcloud-data' ;


export const apiUrls = {
	addRule : basePath + `/api/rule/addRule`,
	deleteRuleById : basePath + '/api/rule/delete/',
	getRuleById : basePath + '/api/rule/getRuleById/' ,
	update : basePath + '/api/rule/update' ,
}



// 添加规则
export async function addRule(params){
	return request( apiUrls.addRule , {
      method:'POST',
      body:params
  })
}
// 更新规则id删除规则信息
export async function deleteRuleById(params,id){
	return request( apiUrls.deleteRuleById + id , {
      method:'GET',
      body:params
  })
}
// 根据规则id查询规则详情
export async function getRuleById(params){
	return request( apiUrls.getRuleById + params.id , {
      method:'GET',
      //body:params
  })
}

// 更新规则信息兼容删除明细(detailsInfo为null删除明细)
export async function update(params){
	return request( apiUrls.update , {
      method:'POST',
      body:params
  })
}